<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader Host: Json::Reader Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader Host
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Host Tools for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_json_1_1_reader.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_json_1_1_reader-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Json::Reader Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Unserialize a <a href="http://www.json.org">JSON</a> document into a <a class="el" href="class_json_1_1_value.html" title="Represents a JSON value. ">Value</a>.  
 <a href="class_json_1_1_reader.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="json_8h_source.html">json.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a3eec9118f3e9a672ba8348c3a79d0f45"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3eec9118f3e9a672ba8348c3a79d0f45"></a>
typedef char&#160;</td><td class="memItemRight" valign="bottom"><b>Char</b></td></tr>
<tr class="separator:a3eec9118f3e9a672ba8348c3a79d0f45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a46795b5b272bf79a7730e406cb96375a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a46795b5b272bf79a7730e406cb96375a"></a>
typedef const Char *&#160;</td><td class="memItemRight" valign="bottom"><b>Location</b></td></tr>
<tr class="separator:a46795b5b272bf79a7730e406cb96375a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0b3c4e24c8393354bab57a6ba3ffc27f"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0b3c4e24c8393354bab57a6ba3ffc27f"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_json_1_1_reader.html#a0b3c4e24c8393354bab57a6ba3ffc27f">Reader</a> ()</td></tr>
<tr class="memdesc:a0b3c4e24c8393354bab57a6ba3ffc27f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <a class="el" href="class_json_1_1_reader.html" title="Unserialize a JSON document into a Value. ">Reader</a> allowing all features for parsing. <br /></td></tr>
<tr class="separator:a0b3c4e24c8393354bab57a6ba3ffc27f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45f17831118337309180313e93ac33f8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45f17831118337309180313e93ac33f8"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_json_1_1_reader.html#a45f17831118337309180313e93ac33f8">Reader</a> (const <a class="el" href="class_json_1_1_features.html">Features</a> &amp;features)</td></tr>
<tr class="memdesc:a45f17831118337309180313e93ac33f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a <a class="el" href="class_json_1_1_reader.html" title="Unserialize a JSON document into a Value. ">Reader</a> allowing the specified feature set for parsing. <br /></td></tr>
<tr class="separator:a45f17831118337309180313e93ac33f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1da6c976ad1e96c742804c3853eef94"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_json_1_1_reader.html#af1da6c976ad1e96c742804c3853eef94">parse</a> (const std::string &amp;document, <a class="el" href="class_json_1_1_value.html">Value</a> &amp;root, bool collectComments=true)</td></tr>
<tr class="memdesc:af1da6c976ad1e96c742804c3853eef94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read a <a class="el" href="class_json_1_1_value.html" title="Represents a JSON value. ">Value</a> from a <a href="http://www.json.org">JSON</a> document.  <a href="#af1da6c976ad1e96c742804c3853eef94">More...</a><br /></td></tr>
<tr class="separator:af1da6c976ad1e96c742804c3853eef94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac71ef2b64c7c27b062052e692af3fb32"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_json_1_1_reader.html#ac71ef2b64c7c27b062052e692af3fb32">parse</a> (const char *beginDoc, const char *endDoc, <a class="el" href="class_json_1_1_value.html">Value</a> &amp;root, bool collectComments=true)</td></tr>
<tr class="memdesc:ac71ef2b64c7c27b062052e692af3fb32"><td class="mdescLeft">&#160;</td><td class="mdescRight">Read a <a class="el" href="class_json_1_1_value.html" title="Represents a JSON value. ">Value</a> from a <a href="http://www.json.org">JSON</a> document.  <a href="#ac71ef2b64c7c27b062052e692af3fb32">More...</a><br /></td></tr>
<tr class="separator:ac71ef2b64c7c27b062052e692af3fb32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d0347e6b47343e4bc68be7ecdb9c4e9"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_json_1_1_reader.html#a8d0347e6b47343e4bc68be7ecdb9c4e9">parse</a> (std::istream &amp;is, <a class="el" href="class_json_1_1_value.html">Value</a> &amp;root, bool collectComments=true)</td></tr>
<tr class="memdesc:a8d0347e6b47343e4bc68be7ecdb9c4e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse from input stream.  <a href="#a8d0347e6b47343e4bc68be7ecdb9c4e9">More...</a><br /></td></tr>
<tr class="separator:a8d0347e6b47343e4bc68be7ecdb9c4e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95ab50aa789132e9dee0fc1475c85acf"><td class="memItemLeft" align="right" valign="top">JSONCPP_DEPRECATED(&quot;Use getFormattedErrorMessages instead&quot;) std std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_json_1_1_reader.html#a95ab50aa789132e9dee0fc1475c85acf">getFormattedErrorMessages</a> () const </td></tr>
<tr class="memdesc:a95ab50aa789132e9dee0fc1475c85acf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a user friendly string that list errors in the parsed document.  <a href="#a95ab50aa789132e9dee0fc1475c85acf">More...</a><br /></td></tr>
<tr class="separator:a95ab50aa789132e9dee0fc1475c85acf"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Unserialize a <a href="http://www.json.org">JSON</a> document into a <a class="el" href="class_json_1_1_value.html" title="Represents a JSON value. ">Value</a>. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a95ab50aa789132e9dee0fc1475c85acf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string Json::Reader::getFormattedErrorMessages </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns a user friendly string that list errors in the parsed document. </p>
<dl class="section return"><dt>Returns</dt><dd>Formatted error message with the list of errors with their location in the parsed document. An empty string is returned if no error occurred during parsing. </dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>Use <a class="el" href="class_json_1_1_reader.html#a95ab50aa789132e9dee0fc1475c85acf" title="Returns a user friendly string that list errors in the parsed document. ">getFormattedErrorMessages()</a> instead (typo fix). </dd></dl>
<p>Returns a user friendly string that list errors in the parsed document. </p><dl class="section return"><dt>Returns</dt><dd>Formatted error message with the list of errors with their location in the parsed document. An empty string is returned if no error occurred during parsing. </dd></dl>

</div>
</div>
<a class="anchor" id="af1da6c976ad1e96c742804c3853eef94"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Json::Reader::parse </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>document</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_json_1_1_value.html">Value</a> &amp;&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>collectComments</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read a <a class="el" href="class_json_1_1_value.html" title="Represents a JSON value. ">Value</a> from a <a href="http://www.json.org">JSON</a> document. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">document</td><td>UTF-8 encoded string containing the document to read. </td></tr>
    <tr><td class="paramname">root</td><td>[out] Contains the root value of the document if it was successfully parsed. </td></tr>
    <tr><td class="paramname">collectComments</td><td><code>true</code> to collect comment and allow writing them back during serialization, <code>false</code> to discard comments. This parameter is ignored if <a class="el" href="class_json_1_1_features.html#a33afd389719624b6bdb23950b3c346c9" title="true if comments are allowed. Default: true. ">Features::allowComments_</a> is <code>false</code>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the document was successfully parsed, <code>false</code> if an error occurred. </dd></dl>

</div>
</div>
<a class="anchor" id="ac71ef2b64c7c27b062052e692af3fb32"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Json::Reader::parse </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>beginDoc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>endDoc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_json_1_1_value.html">Value</a> &amp;&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>collectComments</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Read a <a class="el" href="class_json_1_1_value.html" title="Represents a JSON value. ">Value</a> from a <a href="http://www.json.org">JSON</a> document. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">beginDoc</td><td>Pointer on the beginning of the UTF-8 encoded string of the document to read. </td></tr>
    <tr><td class="paramname">endDoc</td><td>Pointer on the end of the UTF-8 encoded string of the document to read. \ Must be &gt;= beginDoc. </td></tr>
    <tr><td class="paramname">root</td><td>[out] Contains the root value of the document if it was successfully parsed. </td></tr>
    <tr><td class="paramname">collectComments</td><td><code>true</code> to collect comment and allow writing them back during serialization, <code>false</code> to discard comments. This parameter is ignored if <a class="el" href="class_json_1_1_features.html#a33afd389719624b6bdb23950b3c346c9" title="true if comments are allowed. Default: true. ">Features::allowComments_</a> is <code>false</code>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the document was successfully parsed, <code>false</code> if an error occurred. </dd></dl>

</div>
</div>
<a class="anchor" id="a8d0347e6b47343e4bc68be7ecdb9c4e9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Json::Reader::parse </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>is</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_json_1_1_value.html">Value</a> &amp;&#160;</td>
          <td class="paramname"><em>root</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>collectComments</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Parse from input stream. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="namespace_json.html#a4d245ef719cc0853e8e78eb5f99c16e5" title="Read from &#39;sin&#39; into &#39;root&#39;. ">Json::operator&gt;&gt;(std::istream&amp;, Json::Value&amp;)</a>. </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="json_8h_source.html">json.h</a></li>
<li>jsoncpp.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespace_json.html">Json</a></li><li class="navelem"><a class="el" href="class_json_1_1_reader.html">Reader</a></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:49:52 for Kinetis Bootloader Host by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
